home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 June: Reference Library / Dev.CD Jun 99 RL Disk 1.toast / Technical Documentation / Develop / develop Issue 28 / develop Issue 28 code / Merge Tools / MacDifference.make < prev    next >
Encoding:
Text File  |  1996-09-25  |  7.8 KB  |  273 lines  |  [TEXT/MPS ]

  1. #
  2. #    MacDifference.make
  3. #
  4. # Macintosh MPW Makefile for the Eclectus Difference utility
  5. # Copyright (C) 1992-96 Eclectus (D. John Anderson, Alan B. Harper).
  6.  
  7. # This file is part of the Eclectus integration utilities.
  8.  
  9. # Eclectus integration utilities are free software; you can redistribute
  10. # it and/or modify it under the terms of the GNU General Public License
  11. # as published by the Free Software Foundation; either version 1, or
  12. # (at your option) any later version.
  13.  
  14. # Eclectus integration utilities are distributed in the hope that they
  15. # will be useful, but WITHOUT ANY WARRANTY; without even the implied
  16. # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. # See the GNU General Public License for more details.
  18.  
  19. # You should have received a copy of the GNU General Public License
  20. # along with the Eclectus integration utilities; see the file COPYING.
  21. # If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge,
  22. # MA 02139, USA.
  23.  
  24. # This make file has the following targets
  25. #
  26. #        Clean:                        Remove all derived files, create directories necessary for other targets below.
  27. #
  28. #        All/<no target>:    Difference and DifferenceDebug as fat tools*
  29. #        Release:                    Fat Difference
  30. #        PPC:                            PPC only Difference
  31. #        68K:                            68K only Difference
  32. #        Debug                            Fat DifferenceDebug*
  33. #        DebugPPC:                    PPC only DifferenceDebug*
  34. #        Debug68K:                    68K only DifferenceDebug*
  35. #
  36. #        Install:                    Install fat Difference and DifferenceDebug*
  37. #        InstallRelease:        Install fat Difference*
  38. #        InstallPPC:                Install PPC Difference*
  39. #        Install68K:                Install 68K Difference*
  40. #        InstallDebug:            Install fat DifferenceDebug*
  41. #        InstallDebugPPC:    Install PPC only DifferenceDebug*
  42. #        InstallDebug68K:    Install 68K only DifferenceDebug*
  43. #
  44. #    *    The code for DifferenceDebug is not included in the standard distribution, since it is used
  45. #        only to test the code. Write Alan Harper (aharper@dnai.com) if you have a need for this code.
  46. #        Also, the Install... targets place the tools in {MPW}ECTools, which may not be where you
  47. #        want them. Change BIN_DIR to adjust this.
  48.  
  49. MWCPPC_OPTIONS = ∂
  50.     -d DF_MACHINE_MACINTOSH ∂
  51.     -d DF_COMPILER_MW ∂
  52.     -d DF_CHIP_PPC ∂
  53.     -mapcr ∂
  54.     -maxerrors 10 ∂
  55.     -once ∂
  56.     -opt all ∂
  57.     -proto strict ∂
  58.     -r ∂
  59.     -str readonly ∂
  60.     -trigraphs on ∂
  61.     -w full
  62.  
  63. MWC68K_OPTIONS = ∂
  64.     -d DF_MACHINE_MACINTOSH ∂
  65.     -d DF_COMPILER_MW ∂
  66.     -d DF_CHIP_68K ∂
  67.     -enum int ∂
  68.     -mapcr ∂
  69.     -maxerrors 10 ∂
  70.     -mbg off ∂
  71.     -mc68020 ∂
  72.     -model codesmart ∂
  73.     -once ∂
  74.     -opt all ∂
  75.     -proto strict ∂
  76.     -r ∂
  77.     -str pool ∂
  78.     -sym off ∂
  79.     -trigraphs on ∂
  80.     -w full
  81.  
  82. ADDL_MWCPPC_OPTIONS = 
  83.  
  84. ADDL_MWC68K_OPTIONS = 
  85.  
  86. MWLINKPPC_OPTIONS = ∂
  87.     -d ∂
  88.     -c 'MPS ' ∂
  89.     -t 'MPST'
  90.  
  91. MWLINK68K_OPTIONS = -mpwtool
  92.  
  93. MWLINKPPC_LIBS = ∂
  94.     "{MWPPCLibraries}"MWMPWCRuntime.Lib ∂
  95.     "{MWPPCLibraries}"'MPW ANSI.C.PPC.Lib' ∂
  96.     "{MWPPCLibraries}"PPCToolLibs.o ∂
  97.     "{SharedLibraries}"InterfaceLib ∂
  98.     "{SharedLibraries}"MathLib 
  99.  
  100. MWLINK68K_LIBS = ∂
  101.     "{MW68KLibraries}"MPWRuntime.68K.lib ∂
  102.     "{MW68KLibraries}"'MPW ANSI (4i/8d) C.68K.Lib' ∂
  103.     "{MW68KLibraries}"'MathLib68K (4i/8d).Lib' ∂
  104.     "{MW68KLibraries}"ToolLibs.o ∂
  105.     "{MW68KLibraries}"MacOS.Lib ∂
  106.  
  107. DERIVED_DIR = :DifferenceR.i
  108.  
  109. DERIVED_DEBUG_DIR = :DifferenceD.i
  110.  
  111. TOOL_NAME = Difference
  112.  
  113. DEBUG_TOOL_NAME = DifferenceDebug
  114.  
  115. INSTALL_AS_NAME = Difference
  116.  
  117. INSTALL_FROM_NAME = Difference
  118.  
  119. BIN_DIR = {MPW}ECTools
  120.  
  121. LOCAL_BIN_DIR = :MacTools
  122.  
  123. DIFFERENCE_TO_OBERISH_DIR = ::Oberish
  124.  
  125. H_FILES = ∂
  126.     diff.h
  127.  
  128. DIFFERENCE_PPC_OBJS = ∂
  129.     {DERIVED_DIR}:analyze.c.x ∂
  130.     {DERIVED_DIR}:io.c.x ∂
  131.     {DERIVED_DIR}:util.c.x ∂
  132.     {DERIVED_DIR}:Difference.c.x ∂
  133.     {DEBUG_PPC_OBJS}
  134.  
  135. DIFFERENCE_68K_OBJS = ∂
  136.     {DERIVED_DIR}:analyze.c.o ∂
  137.     {DERIVED_DIR}:io.c.o ∂
  138.     {DERIVED_DIR}:util.c.o ∂
  139.     {DERIVED_DIR}:Difference.c.o ∂
  140.     {DEBUG_68K_OBJS}
  141.  
  142. DEBUG_PPC_OBJS =
  143.  
  144. DEBUG_68K_OBJS =
  145.  
  146. Release ƒ Difference
  147.  
  148. All ƒ Release Debug
  149.  
  150. PPC ƒ Difference.PPC
  151.  
  152. 68K ƒ Difference.68K
  153.  
  154. Debug ƒ DifferenceDebug
  155.  
  156. DebugPPC ƒ DifferenceDebug.PPC
  157.  
  158. Debug68K ƒ DifferenceDebug.68K
  159.  
  160. Difference ƒ {DERIVED_DIR}:Difference
  161.  
  162. Difference.PPC ƒ {DERIVED_DIR}:Difference.PPC
  163.  
  164. Difference.68K ƒ {DERIVED_DIR}:Difference.68K
  165.  
  166. DifferenceDebug ƒ 
  167.     Make -f MacDifference.make ∂
  168.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  169.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  170.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  171.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {DIFFERENCE_TO_OBERISH_DIR}" ∂
  172.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {DIFFERENCE_TO_OBERISH_DIR}" ∂
  173.         -d TOOL_NAME={DEBUG_TOOL_NAME} ∂
  174.         {DERIVED_DEBUG_DIR}:{DEBUG_TOOL_NAME}
  175.  
  176. DifferenceDebug.PPC ƒ
  177.     Make -f MacDifference.make ∂
  178.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  179.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  180.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {DIFFERENCE_TO_OBERISH_DIR}" ∂
  181.         -d TOOL_NAME={DEBUG_TOOL_NAME} ∂
  182.         {DERIVED_DEBUG_DIR}:{DEBUG_TOOL_NAME}.PPC
  183.  
  184. DifferenceDebug.68K ƒ
  185.     Make -f MacDifference.make ∂
  186.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  187.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  188.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {DIFFERENCE_TO_OBERISH_DIR}" ∂
  189.         -d TOOL_NAME={DEBUG_TOOL_NAME} ∂
  190.         {DERIVED_DEBUG_DIR}:{DEBUG_TOOL_NAME}.68K
  191.  
  192. {DIFFERENCE_PPC_OBJS} ƒ {H_FILES}
  193.  
  194. {DIFFERENCE_68K_OBJS} ƒ {H_FILES}
  195.  
  196. {DERIVED_DIR}: ƒ :
  197.  
  198. {DERIVED_DIR}: ƒ {DIFFERENCE_TO_OBERISH_DIR}:
  199.  
  200. {DERIVED_DIR}:{TOOL_NAME} ƒ {DERIVED_DIR}:{TOOL_NAME}.PPC {DERIVED_DIR}:{TOOL_NAME}.68K
  201.     Duplicate -y {DERIVED_DIR}:{TOOL_NAME}.PPC {DERIVED_DIR}:{TOOL_NAME}
  202.     Rez -append -o {DERIVED_DIR}:{TOOL_NAME} -d RSRCNAME="∂"{DERIVED_DIR}:{TOOL_NAME}.68K∂"" MacCopyRSRC.r
  203.  
  204. {DERIVED_DIR}:{TOOL_NAME}.PPC ƒ  {DIFFERENCE_PPC_OBJS}
  205.     MWLinkPPC {MWLINKPPC_LIBS} {DIFFERENCE_PPC_OBJS} {MWLINKPPC_OPTIONS} -o {Targ}
  206.     Rez -d APPNAME=∂"{TOOL_NAME}∂" MacGenericCFRG.r -o {Targ}
  207.  
  208. {DERIVED_DIR}:{TOOL_NAME}.68K ƒ  {DIFFERENCE_68K_OBJS}
  209.     MWLink68K {MWLINK68K_LIBS} {DIFFERENCE_68K_OBJS} {MWLINK68K_OPTIONS} -o {Targ}
  210.  
  211. Install ƒ InstallRelease InstallDebug
  212.  
  213. InstallRelease ƒ {DERIVED_DIR}:{INSTALL_FROM_NAME}
  214.     If not `Exists {BIN_DIR}:`
  215.         NewFolder {BIN_DIR}:
  216.     End
  217.     Duplicate -y {DERIVED_DIR}:{INSTALL_FROM_NAME} {BIN_DIR}:{INSTALL_AS_NAME}
  218.     If not `Exists {LOCAL_BIN_DIR}:`
  219.         NewFolder {LOCAL_BIN_DIR}:
  220.     End
  221.     Duplicate -y {DERIVED_DIR}:{INSTALL_FROM_NAME} {LOCAL_BIN_DIR}:{INSTALL_AS_NAME}.mpw
  222.  
  223. InstallPPC ƒ
  224.     Make -f MacDifference.make InstallRelease ∂
  225.         -d INSTALL_FROM_NAME="Difference.PPC" ∂
  226.         -d TOOL_NAME="Difference"
  227.  
  228. Install68K ƒ
  229.     Make -f MacDifference.make InstallRelease ∂
  230.         -d INSTALL_FROM_NAME="Difference.68K" ∂
  231.         -d TOOL_NAME="Difference"
  232.  
  233. InstallDebug ƒ
  234.     Make -f MacDifference.make InstallRelease ∂
  235.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {DIFFERENCE_TO_OBERISH_DIR}" ∂
  236.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {DIFFERENCE_TO_OBERISH_DIR}" ∂
  237.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  238.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  239.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  240.         -d INSTALL_FROM_NAME="DifferenceDebug" ∂
  241.         -d INSTALL_AS_NAME="DifferenceDebug" ∂
  242.         -d TOOL_NAME="DifferenceDebug"
  243.  
  244. InstallDebugPPC ƒ
  245.     Make -f MacDifference.make InstallRelease ∂
  246.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {DIFFERENCE_TO_OBERISH_DIR}" ∂
  247.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  248.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  249.         -d INSTALL_FROM_NAME="DifferenceDebug.PPC" ∂
  250.         -d INSTALL_AS_NAME="DifferenceDebug" ∂
  251.         -d TOOL_NAME="DifferenceDebug"
  252.  
  253. InstallDebug68K ƒ
  254.     Make -f MacDifference.make InstallRelease ∂
  255.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {DIFFERENCE_TO_OBERISH_DIR}" ∂
  256.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  257.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  258.         -d INSTALL_FROM_NAME="DifferenceDebug.68K" ∂
  259.         -d INSTALL_AS_NAME="DifferenceDebug" ∂
  260.         -d TOOL_NAME="DifferenceDebug"
  261.  
  262. Clean ƒ
  263.     Delete -y -i {DERIVED_DIR}
  264.     NewFolder {DERIVED_DIR}
  265.     Delete -y -i {DERIVED_DEBUG_DIR}
  266.     NewFolder {DERIVED_DEBUG_DIR}
  267.  
  268. .c.x ƒ .c
  269.     MWCPPC {MWCPPC_OPTIONS} {ADDL_MWCPPC_OPTIONS} {DepDir}{Default}.c -o {Targ}
  270.  
  271. .c.o ƒ .c
  272.     MWC68K {MWC68K_OPTIONS} {ADDL_MWC68K_OPTIONS} {DepDir}{Default}.c -o {Targ}
  273.